home *** CD-ROM | disk | FTP | other *** search
/ Kit PC World De Ampliacion De Windows 95 / Kit PC World de ampliacion de Windows 95.iso / lotus / lotus025.dsk / USERBAR.LSS < prev    next >
Text File  |  1995-07-12  |  2KB  |  40 lines

  1. %REM
  2. This template demonstrates creating a User Bar.  You will need to use the Lotus Dialog Editor to create 
  3. the Dialog Box.  With your cursor in the main document, select Edit/ Scripts & Macros/ New Custom Dialog.  
  4.  Paste your Custom Dialog Box into the new section and change the Section tab to the name you will use 
  5. to reference the dialog.  Then modify the code below as needed for your application.
  6. %ENDREM
  7.     
  8.     'Place this line in the Declarations section of your script
  9.     Dim ThisDialog As LWPCustomDialog
  10.     
  11.     'These lines wil Link your variable to the description and define it as a Word Pro User Bar
  12.     Set ThisDialog = Bind("!NameOfDialog")
  13.  
  14.     ThisDialog.Modal = False
  15.     ThisDialog.BarType = 1 ' 2  application, 1  Document
  16.     
  17.     ThisDialog.BarSide = 2 '1 Left , 2 Top, 4 Right, 8 Bottom
  18.     
  19.     'If you have any values that need to be inserted into the dialog prior to displaying, use the following
  20.     'Methods:
  21.     '        AddListBoxText( Control_ID, Text )
  22.     '        SetControlText( Control_ID, Text )
  23.     '        SetControlValue( Control_ID, Value )
  24.     'This line fills and edit box with some dafault text
  25.     ThisDialog.SetControlText  8000, "Type Company Name Here" 
  26.     'This line sets a radio button to selected
  27.     ThisDialog.SetControlValue  20, True 
  28.     
  29.     'Use the "On Event" command to set up a subroutine that will perform the necessary functions
  30.     On Event DialogEvent From ThisDialog Call MyDialogEvent
  31.     
  32.     ThisDialog.Show(0)
  33.     
  34.  
  35. Sub MyDialogEvent(Source as LWPCustomDialog, Controlid as Integer, Why as Integer)
  36.     If (Controlid = 0) And (Why = 7007) Then
  37.         Messagebox ThisDialog.GetControlText( 8000 )
  38.     End If
  39. End Sub
  40.